package vip.meeet.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import vip.meeet.bean.LifeCycleBean;
import vip.meeet.bean.User;

@Configuration
@ComponentScan({
        "org.curitis.spring"
})
public class SpringLifeCycleConfig {

    @Bean(name = "lifeCycleBean",initMethod = "initMethod",destroyMethod = "destroyMethod")
    public static LifeCycleBean getLifeCycleBean(){
        LifeCycleBean lifeCycleBean = new LifeCycleBean();
        lifeCycleBean.setId(1);
        return lifeCycleBean;
    }

//    @Bean
    public static User getUser(){
        return new User();
    }
}
